<?php
class logEntity
{
	public static function AddDailyHistory($daily_id,$user,$content,$mark='')
	{
		$data = array();
		$data['daily_id'] = $daily_id;
		$data['userid']   = $user['uid'];
		$data['username'] = $user['username'];
		$data['content']  = $user['nickname']. "[" .$user['username'] ."]" .$content;
		$data['mark'] = $mark;
		$data['createtime'] = $_ENV['time'];
		$data['nickname'] = $user['nickname'];
		$oid = InsertTable('daily_history', saddslashes($data));
		return $oid;
	}
	
	public static function GetDailyHistory($daily_id)
	{
		return $_ENV['db']->fetchAll("SELECT * FROM daily_history WHERE daily_id='{$daily_id}' order by createtime ");
	}
}
?>